package models

import (
	"gitee.com/lidongyooo/goblog/pkg/types"
	"time"
)

type BaseModel struct {
	Id uint64 `gorm:"column:id;primaryKey;autoIncrement;not null"`

	CreatedAt time.Time `gorm:"column:created_at;index"`
	UpdatedAt time.Time `gorm:"column:updated_at;index"`
}

func (m BaseModel) GetStringId() string {
	return types.UInt64ToString(m.Id)
}